﻿@model yq.IBase.Table.TableInfo
           @{
    Layout = null;
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using yq.IBase;
using yq.Model.Base;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using cn.Util;

namespace yq.Model.Logic
{
    /// <summary>
    /// @(Model.Name) - 对象继承类
    /// </summary>
    [MetadataType(typeof(@(Model.ClassName)ValidaTion))]
    public class @Model.ClassName : I@(Model.ClassName)<@Model.ClassName>
    {


       #region 生成实体类验证属性
       /// <summary>
       /// 辅助验证类
       /// </summary>
       [Bind]
       public class @(Model.ClassName)ValidaTion
       {

@foreach (var info in Model.Columns)
{
    if (info.Code.Equals("Version"))
    {
        continue;
    }
    
    
     <text>

        /// <summary>
        /// @info.Name
        /// </summary>
        @Html.Raw(Tool.GetValidaTion(info.DataType,info.Stereotype,Model.ClassName,info.Code,info.Name,info.Mandatory, info.Length))
        public @(Tool.GetTypeName(info.DataType,info.Stereotype,Model.ClassName,info.Code)) @(info.Code)
        {
         get; set; 
        }


       </text>
}

       
       }
       #endregion 生成实体类验证属性
    }
}
